/**
 * Created by apple on 2017/6/25.
 */
import React,{Component} from 'react';
import {
  View,Text,
  StyleSheet
} from "react-native";

import Girl from "./Girl"
import NavigationBar from "./common/NaviagtionBar"
export default class Boy extends Component{
  constructor(props){
    super(props);
    this.state= {
      word:''
    }
  }
  render(){
    return (<View style={styles.container}>
        <NavigationBar
          title="Boy"
          style={{
            backgroundColor:'red'
          }}
          statusBar={{
            backgroundColor:"red"
          }}
        />

        <Text style={styles.text}>
          我是男的
        </Text>
      <Text style = {styles.text}
        onPress = {() =>{
          this.props.navigator.push({
            component:Girl,
            params:{
              word:"一枝玫",
              onCallBack: (word) =>{
                this.setState({
                  word:word
                })
              }
            }
          })
        }
        }
      >
      送女孩一枝玫
      </Text>
      <Text style={styles.text}>{this.state.word}</Text>
    </View>
    )
  }


}
const styles = StyleSheet.create({
  container:{
    flex:1,
    backgroundColor:"gray",
  },
  text:{
    fontSize:20
  }
})
